var formulaUtil={
    averageCalculation:function(arr,accuracy){  //accuracy 精度保留小数位数
        // debugger;
        var sum=0;
        var ave="";
        if(accuracy==undefined || accuracy==null || accuracy=="") accuracy=1;
        accuracy=Math.pow(10,accuracy);
        if(arr!=null && arr.length>0){
            for(var i=0;i<arr.length;i++){
                sum+=Number(arr[i]);
            }
            ave=Math.round(sum/arr.length*accuracy)/(accuracy);
        }
        return ave;
    },
    absolutelyCalculation:function(arr){

    },
    relativeCalculation:function(arr){

    },
    repeartCalculation:function(){

    },
    driftCalculation:function(){

    },
    arraySort:function(arr){

    },
    getAbsMaxValue:function(arr){
        var Max=0;
        if(arr!=null && arr.length>0){
            for(var i=0;i<arr.length;i++){
               if(arr[i]!=null && arr[i]!="" && Math.abs(Max)<Math.abs(Number(arr[i]))){
                   Max=Number(arr[i]);
               }
            }
        }
        return Max;
    }
}